High Performance MySQL by Schwartz Baron Tkachenko Vadim Zaitsev Peter & Peter Zaitsev & Vadim Tkachenko

High Performance MySQL by Schwartz Baron Tkachenko Vadim Zaitsev Peter & Peter Zaitsev & Vadim Tkachenko

Author:Schwartz, Baron, Tkachenko, Vadim, Zaitsev, Peter & Peter Zaitsev & Vadim Tkachenko [Baron Schwartz]
Language: eng
Format: epub
Tags: COMPUTERS / Database Management / Data Mining
ISBN: 9781449332495
Publisher: O'Reilly Media
Published: 2012-03-04T16:00:00+00:00


When Should You Use Flash?

The most obvious use case for solid-state storage is any workload that has a lot of random I/O. Random I/O is usually caused by the data being larger than the server’s memory. With standard hard drives, you’re limited by rotation speed and seek latency. Flash devices can ease the pain significantly.

Of course, sometimes you can simply buy more RAM so the random workload will fit into memory, and the I/O goes away. But when you can’t buy enough RAM, flash can help. Another problem that you can’t always solve with RAM is that of a high-throughput write workload. Adding memory will help reduce the write workload that reaches the disks, because more memory creates more opportunities to buffer and combine writes. This allows you to convert a random write workload into a more sequential one. However, this doesn’t work infinitely, and some transactional or insert-heavy workloads don’t benefit from this approach anyway. Flash storage can help here, too.

Single-threaded workloads are another characteristic scenario where flash can potentially help. When a workload is single-threaded it is very sensitive to latency, and the lower latency of solid-state storage makes a big difference. In contrast, multi-threaded workloads can often simply be parallelized more heavily to get more throughput. MySQL replication is the obvious example of a single-threaded workload that benefits a lot from reduced latency. Using flash storage on replicas can often improve their performance significantly when they are having trouble keeping up with the master.

Flash is also great for server consolidation, especially in the PCIe form factor. We’ve seen opportunities to consolidate many server instances onto a single physical server—sometimes up to a 10- or 15-fold consolidation is possible. See Chapter 11 for more on this topic.

Flash isn’t always the answer, though. A good example is for sequential write workloads such as the InnoDB log files. Flash doesn’t offer much of a cost-to-performance advantage in this scenario, because it’s not much faster at sequential writes than standard hard drives are. Such workloads are also high-throughput, which will wear out the device faster. It’s often a better idea to store your log files on standard hard drives, with a RAID controller that has a battery-backed write cache.

And sometimes the answer lies in the memory-to-disk ratio, not just in the disk. If you can buy enough RAM to cache your workload, you may find this cheaper and more effective than purchasing a flash storage device.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.